/* eslint-disable spaced-comment */
/* eslint-disable no-dupe-keys */
import Vue from 'vue'
import Router from 'vue-router'

// in development-env not use lazy-loading, because lazy-loading too many pages will cause webpack hot update too slow. so only in production use lazy-loading;
// detail: https://panjiachen.github.io/vue-element-admin-site/#/lazy-loading

Vue.use(Router)

/* Layout */
import Layout from '../modules/layout/Layout'

/**
* hidden: true                   if `hidden:true` will not show in the sidebar(default is false)
* alwaysShow: true               if set true, will always show the root menu, whatever its child routes length
*                                if not set alwaysShow, only more than one route under the children
*                                it will becomes nested mode, otherwise not show the root menu
* redirect: noredirect           if `redirect:noredirect` will no redirct in the breadcrumb
* name:'router-name'             the name is used by <keep-alive> (must set!!!)
* meta : {
    title: 'title'               the name show in submenu and breadcrumb (recommend set)
    icon: 'svg-name'             the icon show in the sidebar,
  }
**/

// 公用页面
export const constantRouterMap = [{
    path: '/login',
    component: () =>
      import('@/modules/login/index'),
    hidden: true
  },
  {
    path: '/404',
    component: () =>
      import('@/modules/404'),
    hidden: true
  },
  // 大屏监控
  {
    path: '/monitor',
    component: () =>
      import('@/modules/monitor/index'),
    hidden: true
  },
  {
    path: '/',
    component: Layout,
    redirect: '/home/index',
    name: 'Home',
    hidden: true,
    children: [{
      path: 'home',
      component: () =>
        import('@/modules/home')
    }]
  },

  // 首页
  {
    path: '/home',
    component: Layout,
    redirect: '/home',
    name: 'home',
    children: [{
      path: 'index',
      name: 'homeIndex',
      component: () =>
        import('@/modules/home/index'),
      meta: {
        title: '首页',
        icon: 'home'
      }
    }]
  },
  //职场监控——新增房间
  //  {
  //   path: '/AddRoom',
  //   name: 'AddRoom',
  //   component: () =>
  //   import('@/modules/siteManagement/workplacemonitoring/addRoom'),
  //   hidden: true
  // },

  // 质检评分
  {
    path: '/scoreOperate',
    name: 'scoreOperate',
    component: () =>
      import('@/QCManage/QCScore/dialog/scoreDialog'),
    hidden: true
  },
  // 案例学习
  {
    path: '/caseStudy',
    name: 'caseStudy',
    component: () =>
      import('@/QCManage/caseManage/caseStudy/dialog/studyDialog'),
    hidden: true
  },
  // 案例审核
  {
    path: '/caseApprove',
    name: 'caseApprove',
    component: () =>
      import('@/QCManage/caseManage/caseApprove/dialog/reviewDialog'),
    hidden: true
  },
  //现场管理
  //职场监控——工位维护
  {
    path: '/UpdateRoom',
    name: 'UpdateRoom',
    component: () =>
      import('@/YYGL/paramManagement/mapParam/roomManage/dialog/updateRoom'),
    hidden: true
  },
  // 职场监控——实时职场监控

  {
    path: '/realTimeMonitor',
    name: 'realTimeMonitor',
    component: () =>
      import('@/YYGL/paramManagement/mapParam/roomManage/dialog/workplacemonitoringSHOW'),
    hidden: true
  },
  // 职场监控的底图;
  // {
  //   path: '/monitorBackgroundImage',
  //   component: Layout,
  //   redirect: '/monitor',
  //   name: 'monitorBackgroundImage',
  //   children: [{
  //     path: 'index',
  //     // name: 'homeIndex',
  //     component: () =>
  //     import('@/modules/siteManagement/workplacemonitoring/monitorBackgroundImage'),
  //     meta: {
  //       title: '职场监控的底图',
  //       icon: 'home'
  //     }
  //   }]
  // },
  // 日历
  {
    path: '/home',
    component: Layout,
    redirect: 'noredirect',
    name: 'calendar',
    hidden: true,
    children: [{
      path: 'eventCalendar',
      name: 'event-calendar',
      component: () =>
        import('@/modules/home/component/eventCalendar'),
      meta: {
        title: '日历',
        icon: 'home'
      }
    }]
  }

  // { path: '*', redirect: '/404', hidden: true }
]

export default new Router({
  // mode: 'history', // 后端支持可开
  scrollBehavior: () => ({
    y: 0
  }),
  routes: constantRouterMap,
  base: '/AUMS/'
})

export const MenuComponent = {
  //坐席管理
  // 坐席班组信息维护
  setaTeam: () =>
    import('@/modules/seat-manage/setaTeam/setaTeam'),
  // 坐席信息维护
  SeatInfoManage: () =>
    import('@/modules/seat-manage/SeatInfoManage/SeatInfoManage'),
  // 用户管理
  // 用户信息管理
  UserInfoManage: () =>
    import('@/modules/user-manage/user-info-manage/UserInfoManage'),
  // 岗位信息管理
  postInfoManage: () =>
    import('@/modules/user-manage/post-info-manage/postInfoManage'),
  // 角色信息管理
  roleInfoManage: () =>
    import('@/modules/user-manage/role-info-manage2/roleInfoManage'),
  // 机构管理
  // 机构信息维护
  branchInfoManage: () =>
    import('@/modules/branch-manage/branch-info-manage/branchInfoManage'),
  // 机构分组维护
  branchGroupManage: () =>
    import('@/modules/branch-manage/branch-group-manage/branchGroupManage'),
  // 交易分组维护
  tradingGroupManage: () =>
    import('@/modules/branch-manage/trading-group-manage/tradingGroupManage'),
  // 资源管理
  // 广告文件管理
  adsFileUpload: () =>
    import('@/modules/resource-manage/advertising/ads-file-upload/adsFileUpload'),
  // 播放规则管理
  adsRuleManage: () =>
    import('@/modules/resource-manage/advertising/ads-rule-manage/adsRuleManage'),
  // 广告节目管理
  adsManage: () =>
    import('@/modules/resource-manage/advertising/ads-manage/adsManage'),
  // 广告发布记录
  adsReleaseResult: () =>
    import('@/modules/resource-manage/advertising/ads-release-result/adsReleaseResult'),
  // 资源二级菜单
  twoMenu: () =>
    import('@/modules/resource-manage/index'),
  // 交易维护
  menuManage: () =>
    import('@/modules/resource-manage/menu/menu-item-mgr/menuItemManage'),
  // 菜单视图管理
  menuViewManage: () =>
    import('@/modules/resource-manage/menu/menu-model-mgr/menuModelManage'),
  // 基础管理
  // 数据字典管理
  dataDictionary: () =>
    import('@/modules/basic-management/data-dictionary/data-dictionary'),
  // 基础数据管理
  // 坐席管理
  userManage: () =>
    import('@/views/baseDataManage/userManage'),
  // 数据字典管理
  dataDictionaryManage: () =>
    import('@/views/baseDataManage/dataDictionaryManage'),
  // 排班数据管理
  // 机构排班参数
  branchBaseData: () =>
    import('@/views/scheduleDataManage/branchBaseData'),
  // 休假池维护
  vacationPool: () =>
    import('@/views/scheduleDataManage/vacationPool-manage/vacationPool'),
  // 坐席排班参数
  userBaseData: () =>
    import('@/views/scheduleDataManage/userBaseData/userBaseData'),
  // 活动类型管理
  activityType: () =>
    import('@/views/scheduleDataManage/activityType/activityType'),
  // 班次管理
  classManage: () =>
    import('@/views/scheduleDataManage/classManage/classManage'),
  // 班次事件管理
  classEventManage: () =>
    import('@/views/scheduleDataManage/classEventManage/classEventManage'),
  // 加班管理
  OTDelay: () =>
    import('@/views/scheduleDataManage/OTDelay-manage/OT-delay'),
  // 分配规则管理
  assignRules: () =>
    import('@/views/scheduleDataManage/assignRules/assignRules'),
  // 工作模式管理
  workModelManage: () =>
    import('@/views/scheduleDataManage/workModelManage/workModelManage'),
  //  自动化智能排班
  // 人力需求配置
  FTEMaintain: () =>
    import('@/views/intelligenceSchedule/FTEMaintain/FTEMaintain'),
  // 伤害值配置
  Badness: () =>
    import('@/views/intelligenceSchedule/Badness/Badness'),
  // 排班计划维护
  planMaintain: () =>
    import('@/views/intelligenceSchedule/planMaintain/planMaintain'),
  // 智能排班引擎
  scheduleReport: () =>
    import('@/views/intelligenceSchedule/scheduleReport/scheduleReport'),
  //  员工班务管理
  // 换班申请
  scheduleApplication: () =>
    import('@/views/userScheduleManage/changeSchedule/scheduleApplication'),
  // 休假申请
  vacationRequest: () =>
    import('@/views/userScheduleManage/vacationRequest/vacationRequest'),
  // 正式班表
  formalClass: () =>
    import('@/views/userScheduleManage/formalClass/formalClass'),
  // 班务审批
  classApprove: () =>
    import('@/views/userScheduleManage/classApprove/classApprove'),
  // 偏好设置
  preferences: () =>
    import('@/views/userScheduleManage/preferences/preferences'),
  //  报表管理
  // 人员排班明细报表
  userScheduleReport: () =>
    import('@/views/reportManage/userScheduleReport'),
  // 人员休假明细报表
  userVacationReport: () =>
    import('@/views/reportManage/userVacationReport'),
  // 排班-人力预测
  //人力预测参数
  forecastParam: () =>
    import('@/views/FTEForecast/forecastParam/forecastParam'),
  //交易维护
  tradingManage: () =>
    import('@/views/FTEForecast/tradingManage/tradingManage'),
  //日期属性维护
  dateManage: () =>
    import('@/views/FTEForecast/dateManage/dateManage'),
  //原始业务数据管理
  originalBusinessData: () =>
    import('@/views/FTEForecast/originalBusinessData/originalBusinessData'),
  // 批次管理
  batchManage: () =>
    import('@/views/FTEForecast/batchManage/batchManage'),
  //人力预测查询
  FTEForecastQuery: () =>
    import('@/views/FTEForecast/FTEForecastQuery/FTEForecastQuery'),
  // 现场管理

  // //工位关联信息查询
  // seatCorrelation: () =>
  // import('@/modules/siteManagement/seatCorrelation/seatCorrelation'),

  // import('@/modules/siteManagement/workplacemonitoring/workplacemonitoringSUZHOU'),
  // 报表

  // 现场管理-参数管理
  // 监控指标
  // 监控KEY值维护
  monitorKey: () =>
    import('@/YYGL/paramManagement/monitorParam/monitorKey/monitorKey'),
  // 监控因子维护
  factorToMaintain: () =>
    import('@/YYGL/paramManagement/monitorParam/factorToMaintain/factorToMaintain'),
  //因子参数维护
  realTimeMonitorParamSetting: () =>
    import('@/YYGL/paramManagement/monitorParam/realTimeMonitorParamSetting/realTimeMonitorParamSetting'),
  // 缓存因子维护
  cacheFactorSetting: () =>
    import('@/YYGL/paramManagement/monitorParam/cacheFactorSetting/cacheFactorSetting'),
  // 实时因子订阅
  // realTimeParamSetting: () =>
  //   import('@/YYGL/paramManagement/monitorParam/realTimeParamSetting/realTimeParamSetting'),
  // indicatorMaintenace
  // indicatorMaintenance
  // indicatorMaintenance
  // 指标维护
  indicatorMaintenance: () =>
    import('@/YYGL/paramManagement/monitorParam/indicatorMaintenance/indicatorMaintenance'),
  //坐席参数
  // 房间维护
  roomManage: () =>
    import('@/YYGL/paramManagement/mapParam/roomManage/roomManage'),
  // 状态图标
  iconManage: () =>
    import('@/YYGL/paramManagement/mapParam/iconManage/iconManage'),
  //坐席状态预警
  agentWarning: () =>
    import('@/YYGL/paramManagement/mapParam/agentWarning/agentWarning'),
  // 六维元素维护
  eleArrManage: () =>
    import('@/YYGL/paramManagement/mapParam/eleArrManage/eleArrManage'),
  // 现场管理-职场监控
  // 坐席地图
  agentMap: () =>
    import('@/YYGL/workplacemonitoring/agentMap/agentMap'),
  // 坐席概览
  seatingOverview: () =>
    import('@/YYGL/workplacemonitoring/seatingOverview/seatingOverview'),
  // 队列概览
  queueOverview: () =>
    import('@/YYGL/workplacemonitoring/queueOverview/queueOverview'),
  //队列详情
  queueDetail: () =>
    // import('@/modules/siteManagement/workplacemonitoring/workplacemonitoring2'),
    import('@/YYGL/workplacemonitoring/queueDetail/queueDetail'),
  //坐席详情
  agentDetail: () =>
    import('@/YYGL/workplacemonitoring/agentDetail/agentDetail'),
  // 现场情况
  siteCondition: () =>
    import('@/YYGL/workplacemonitoring/siteCondition/siteCondition'),
  //坐席状态详情
  seatStatusDetail: () =>
    import('@/YYGL/workplacemonitoring/seatStatusDetail/seatStatusDetail'),
  //现场管理-查询统计
  // 队列日报
  queueDaily: () =>
    import('@/YYGL/Report/queueDaily'),
  // 坐席日报
  agentDaily: () =>
    import('@/YYGL/Report/agentDaily'),
  //坐席状态查询
  agentState: () =>
    import('@/YYGL/Report/agentState/agentState'),
  //签入签出查询
  checkInOut: () =>
    import('@/YYGL/Report/checkInOut/checkInOut'),
  //坐席小休查询
  agentRest: () =>
    import('@/YYGL/Report/agentRest/agentRest'),
  //人工呼入简要报表
  callin: () =>
    import('@/YYGL/Report/callin/callin'),
  //人工外呼简要报表
  callout: () =>
    import('@/YYGL/Report/callout/callout'),
  //vtm坐席业务量
  businesscount: () =>
    import('@/YYGL/Report/businesscount/businesscount'),
  //vtm坐席业务类型
  businesstype: () =>
    import('@/YYGL/Report/businesstype/businesstype'),
  //话务员接续表
  talkerContinue: () =>
    import('@/YYGL/Report/talkerContinue/talkerContinue'),
  // 绩效分析
  performanceAnalysis: () =>
    import('@/YYGL/Report/performanceAnalysis/performanceAnalysis'),


  //   logDownload: () =>
  //   import('@/modules/info-collect/logDownload'),
  //   // 投诉信息统计
  //   complaintStatistics: () =>
  //   import('@/modules/reportforms-manage-AWEB/work-order-table/complaintStatistics/complaintStatistics'),
  // 柜员管理
  // 柜员信息维护
  // tellerInfoMaintenance: () =>
  // import('@/modules/tellerManagement/tellerInfoMaintenance/tellerInfoMaintenance')
  // 质检
  // 评分模板
  // 评分大项
  scoreDictionaryBig: () =>
    import('@/QCManage/scoreTemplate/scoreDictionaryBig/scoreDictionaryBig'),
  // 评分子项
  scoreDictionarySmall: () =>
    import('@/QCManage/scoreTemplate/scoreDictionarySmall/scoreDictionarySmall'),
  //评分模板
  scoreTemplate: () =>
    import('@/QCManage/scoreTemplate/scoreTemplate/scoreTemplate'),
  //模板关系维护
  templateChannelManage: () =>
    import('@/QCManage/scoreTemplate/templateChannelManage/templateChannelManage'),
  //数据采集
  //质检数据采集
  //数据采集导入字段维护
  importDataManage: () =>
    import('@/QCManage/dataCollectionManage/importDataManage/importDataManage'),
  dataCollection: () =>
    import('@/QCManage/dataCollectionManage/dataCollection/dataCollection'),
  // 质检数据采集明细
  dataCollectedDetail: () =>
    import('@/QCManage/dataCollectionManage/dataCollectedDetail/dataCollectedDetail'),
  // 抽样管理
  //质检数据手动抽样
  dataManualSample: () =>
    import('@/QCManage/sampleManage/dataManualSample/dataManualSample'),
  //抽样规则字典
  sampleDictionary: () =>
    import('@/QCManage/sampleManage/sampleDictionary/sampleDictionary'),
  //自动抽样规则管理
  autoSampleRules: () =>
    import('@/QCManage/sampleManage/autoSampleRules/autoSampleRules'),
  //抽样汇总查询
  sampleRulesResult: () =>
    import('@/QCManage/sampleManage/sampleRulesResult/sampleRulesResult'),
  //质检抽样结果管理
  sampleResultManage: () =>
    import('@/QCManage/sampleManage/sampleResultManage/sampleResultManage'),
  //质检任务分配
  // 任务分配
  taskAssignment: () =>
    import('@/QCManage/taskAssignment/taskAssignment/taskAssignment'),
  // 任务操作
  taskAssignmentManage: () =>
    import('@/QCManage/taskAssignment/taskAssignmentManage/taskAssignmentManage'),
  //任务分发明细
  taskAssignmentDetail: () =>
    import('@/QCManage/taskAssignment/taskAssignmentDetail/taskAssignmentDetail'),
  //质检评分
  QCScore: () =>
    import('@/QCManage/QCScore/QCScore'),
  //权限设置
  QCPermission: () =>
    import('@/QCManage/QCPermission/QCPermission'),
  //质检汇总
  QCSummary: () =>
    import('@/QCManage/QCSummary/QCSummary'),
  //质检复议
  QCReconsideration: () =>
    import('@/QCManage/QCReconsideration/QCReconsideration'),
  //案例管理
  // 案例管理
  caseManage: () =>
    import('@/QCManage/caseManage/caseManage/caseManage'),
  //案例审批
  caseApprove: () =>
    import('@/QCManage/caseManage/caseApprove/caseApprove'),
  //分配学习任务
  addStudyTask: () =>
    import('@/QCManage/caseManage/addStudyTask/addStudyTask'),
  //案例学习
  caseStudy: () =>
    import('@/QCManage/caseManage/caseStudy/caseStudy'),
  //学习情况统计
  studySituation: () =>
    import('@/QCManage/caseManage/studySituation/studySituation'),
  CloudTellerManage: () =>
    import('@/CTManage/cloud-teller-manage/cloud-teller-manage/CloudTellerManage'),
  TellerSkillManage: () =>
    import('@/CTManage/cloud-teller-manage/teller-skill/TellerSkillManage'), 
  TellerMatchSkillManage: () =>
    import('@/CTManage/cloud-teller-manage/teller-match-skill/TellerMatchSkillManage'),   
  TellerCorrespondPost: () =>
    import('@/CTManage/cloud-teller-manage/teller-correspond-post/TellerCorrespondPost'), 
  skillCorrespondTransaction: () =>
    import('@/CTManage/cloud-teller-manage/skill-correspond-transaction/skillCorrespondTransaction'), 
  ChannelCorrespondTransactionManage: () =>
    import('@/CTManage/cloud-teller-manage/channel-correspond-transaction/ChannelCorrespondTransactionManage'), 
  TellerCorrespondChannelManage: () =>
    import('@/CTManage/cloud-teller-manage/Teller-correspond-channel/TellerCorrespondChannelManage'), 
  TellerNotTransactionManage: () =>
    import('@/CTManage/cloud-teller-manage/Teller-not-transaction-manage/TellerNotTransactionManage'), 
  AgentPostInfoManage: () =>
    import('@/CTManage/cloud-teller-manage/Agent-info-manage/AgentPostInfoManage'), 
  FlowTradeInfoManage: () =>
    import('@/CTManage/cloud-teller-manage/FlowTrade-info-manage/FlowTradeInfoManage'), 
  BranchCenterInfoManage: () =>
    import('@/CTManage/cloud-teller-manage/branchCenter-info-manage/BranchCenterInfoManage'),     
}
